-content_for :modal_title do
  -if f.object.new_record?
    Create a new product
  -else
    Edit product

-if !f.object.new_record?
  -content_for :modal_delete_path, delete_flow_product_path(f.object)

.row-fluid
  =wrapped_text_field f, :span6, :title, :placeholder => 'Enter title', :label_name => 'Title <span class="required">*</span>'.html_safe
  .span6
    .row-fluid
      =wrapped_text_field f, :span6, :slug, :label_name => 'Code (autofill)', :placeholder => 'PRODUCT-XXXX'
      -#=wrapped_text_field f, :span6, :version, :placeholder => '1.1.1'
      =wrapped_select f, :span6, :type_id, Option.options_for(:product_type).map { |o| [o.title, o.id] }, :selected => (f.object.respond_to?(:type_id) ? f.object.type_id : nil), :label_name => 'Type'
.row-fluid
  =wrapped_text_area f, :span6, :description, :class => 'double wysihtml5', :wrapper_div_class => 'wysiwyg-area', :placeholder => 'Enter description here'
  .span6
    .row-fluid
      =wrapped_date_field f, :span6, :start_date, :class => 'date', :label_name => 'Effective Date', :placeholder => 'MM/DD/YYYY'
      =wrapped_date_field f, :span6, :stop_date, :class => 'date', :label_name => 'Stop Date', :placeholder => 'MM/DD/YYYY'

.row-fluid
  =wrapped_text_field f, :span6, :url, :label_name => 'Direct URL for Product (optional)', :placeholder => 'http://www.example.com/'

  .span6

%br

=render :partial => "shared/wysihtml5"
